<cfcomponent extends="TracRpcAdapterAbstractTest">

	<cffunction name="testGetTicketComponentNames" returntype="void" access="public">
		<cfset var results = xmlCall("ticket.component.getAll",'<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>ticket.component.getAll</methodName><params/></methodCall>') />
		<cfset assertComplexValue(value=results) />
	</cffunction>

 	<cffunction name="testGetTicketComponentMultiCall" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset results = multiCall('<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>system.multicall</methodName><params><param><value><array><data><value><struct><member><name>params</name><value><array><data><value>dpages</value></data></array></value></member><member><name>methodName</name><value>ticket.component.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>cfsvn</value></data></array></value></member><member><name>methodName</name><value>ticket.component.get</value></member></struct></value></data></array></value></param></params></methodCall>') />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketMilestoneNames" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset params["projectID"] = 1>
		<cfset results = variables.tracRpcAdapter.runMethod(1,"ticket.milestone.getAll",params)>
<!---
 		<cfdump var="#xmlparse(CFML2XMLRPC(results,"response"))#"><cfabort />
 --->
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketMilestone" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset params["projectID"] = variables.projectId />
		<cfset params["milestoneName"] = "milestone one" />
		<cfset results = variables.tracRpcAdapter.runMethod(1,"ticket.milestone.get",params) />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketPriorityNames" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset params["projectID"] = variables.projectId />
		<cfset results = variables.tracRpcAdapter.runMethod(1,"ticket.priority.getAll",params) />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketPriority" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset params["projectID"] = variables.projectId />
		<cfset params["priorityName"] = "high" />
		<cfset results = variables.tracRpcAdapter.runMethod(1,"ticket.priority.get",params) />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketPriorityMultiCall" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset results = multiCall( '<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>system.multicall</methodName><params><param><value><array><data><value><struct><member><name>params</name><value><array><data><value>highest</value></data></array></value></member><member><name>methodName</name><value>ticket.priority.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>high</value></data></array></value></member><member><name>methodName</name><value>ticket.priority.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>normal</value></data></array></value></member><member><name>methodName</name><value>ticket.priority.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>low</value></data></array></value></member><member><name>methodName</name><value>ticket.priority.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>lowest</value></data></array></value></member><member><name>methodName</name><value>ticket.priority.get</value></member></struct></value></data></array></value></param></params></methodCall>') />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketVersionNames" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset params["projectID"] = variables.projectId />
		<cfset results = variables.tracRpcAdapter.runMethod(1,"ticket.version.getAll",params) />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketVersion" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset params["projectID"] = variables.projectId />
		<cfset params["versionName"] = "1.0" />
		<cfset results = variables.tracRpcAdapter.runMethod(1,"ticket.version.get",params) />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketVersionMultiCall" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset results = multiCall( '<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>system.multicall</methodName><params><param><value><array><data><value><struct><member><name>params</name><value><array><data><value>2.0</value></data></array></value></member><member><name>methodName</name><value>ticket.version.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>1.0</value></data></array></value></member><member><name>methodName</name><value>ticket.version.get</value></member></struct></value></data></array></value></param></params></methodCall>') />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketResolutionNames" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset params["projectID"] = variables.projectId />
		<cfset results = variables.tracRpcAdapter.runMethod(1,"ticket.resolution.getAll",params) />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketResolution" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset params["projectID"] = variables.projectId />
		<cfset params["resolutionName"] = "duplicate" />
		<cfset results = variables.tracRpcAdapter.runMethod(1,"ticket.resolution.get",params) />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketResolutionMultiCall" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset results = multiCall( '<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>system.multicall</methodName><params><param><value><array><data><value><struct><member><name>params</name><value><array><data><value>fixed</value></data></array></value></member><member><name>methodName</name><value>ticket.resolution.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>invalid</value></data></array></value></member><member><name>methodName</name><value>ticket.resolution.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>wontfix</value></data></array></value></member><member><name>methodName</name><value>ticket.resolution.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>duplicate</value></data></array></value></member><member><name>methodName</name><value>ticket.resolution.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>worksforme</value></data></array></value></member><member><name>methodName</name><value>ticket.resolution.get</value></member></struct></value></data></array></value></param></params></methodCall>') />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketSeverityNames" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset params["projectID"] = variables.projectId />
		<cfset results = variables.tracRpcAdapter.runMethod(1,"ticket.severity.getAll",params) />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketSeverity" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset params["projectID"] = variables.projectId />
		<cfset params["severityName"] = "blocker" />
		<cfset results = variables.tracRpcAdapter.runMethod(1,"ticket.severity.get",params) />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketSeverityMultiCall" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset results = multiCall( '<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>system.multicall</methodName><params><param><value><array><data><value><struct><member><name>params</name><value><array><data><value>blocker</value></data></array></value></member><member><name>methodName</name><value>ticket.severity.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>critical</value></data></array></value></member><member><name>methodName</name><value>ticket.severity.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>major</value></data></array></value></member><member><name>methodName</name><value>ticket.severity.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>normal</value></data></array></value></member><member><name>methodName</name><value>ticket.severity.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>minor</value></data></array></value></member><member><name>methodName</name><value>ticket.severity.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>trivial</value></data></array></value></member><member><name>methodName</name><value>ticket.severity.get</value></member></struct></value></data></array></value></param></params></methodCall>') />
		<cfset assertComplexValue(value=results) />
	</cffunction>


	<cffunction name="testGetTicketStatusNames" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset params["projectID"] = variables.projectId />
		<cfset results = variables.tracRpcAdapter.runMethod(1,"ticket.status.getAll",params) />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketStatus" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset params["projectID"] = variables.projectId />
		<cfset params["statusName"] = "new" />
		<cfset results = variables.tracRpcAdapter.runMethod(1,"ticket.status.get",params) />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketStatusMultiCall" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset results = multiCall( '<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>system.multicall</methodName><params><param><value><array><data><value><struct><member><name>params</name><value><array><data><value>new</value></data></array></value></member><member><name>methodName</name><value>ticket.status.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>assigned</value></data></array></value></member><member><name>methodName</name><value>ticket.status.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>reopened</value></data></array></value></member><member><name>methodName</name><value>ticket.status.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>closed</value></data></array></value></member><member><name>methodName</name><value>ticket.status.get</value></member></struct></value></data></array></value></param></params></methodCall>') />
		<cfset assertComplexValue(value=results) />
	</cffunction>


	<cffunction name="testGetTicketTypeNames" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset params["projectID"] = variables.projectId />
		<cfset results = variables.tracRpcAdapter.runMethod(1,"ticket.type.getAll",params) />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketType" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset params["projectID"] = variables.projectId />
		<cfset params["typeName"] = "defect" />
		<cfset results = variables.tracRpcAdapter.runMethod(1,"ticket.type.get",params) />
		<cfset assertComplexValue(value=results) />
	</cffunction>

	<cffunction name="testGetTicketTypeMultiCall" returntype="void" access="public">
		<cfset var params = structNew()>
		<cfset var results = "" />
		<cfset results = multiCall( '<?xml version="1.0" encoding="UTF-8"?><methodCall><methodName>system.multicall</methodName><params><param><value><array><data><value><struct><member><name>params</name><value><array><data><value>defect</value></data></array></value></member><member><name>methodName</name><value>ticket.type.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>enhancement</value></data></array></value></member><member><name>methodName</name><value>ticket.type.get</value></member></struct></value><value><struct><member><name>params</name><value><array><data><value>task</value></data></array></value></member><member><name>methodName</name><value>ticket.type.get</value></member></struct></value></data></array></value></param></params></methodCall>') />
		<cfset assertComplexValue(value=results) />
	</cffunction>

</cfcomponent>